package com.linlong.linlongchat.utils;

import java.util.Random;

/**
 * @Description: 字符串工具类
 * @Author: Yhj
 * @Date: 2024/9/19 22:36
 */
public class StringToolsUtil {
    public static String generateRandomAccount(int length) {
        StringBuilder account = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            // 生成数字字符
            int digit = random.nextInt(10); // 0到9的数字
            account.append(digit);
        }
        return account.toString();
    }
}
